/**
 * <p>Title: Carte </p>
 *
 * <p>Description: Une question et ses reponses</p>
 *
 * <p>Copyright: (c) 2008 FSSIM</p>
 *
 * <p>Company: FSSImock</p>
 *
 * @author Antoine Farnault
 * @author Augustin Couette
 * @version 1.0
 */
public class Carte {
	public String question, rA, rB, rC, rD, r;
	public String reponse;
	
	public Carte(String question, String rA, String rB, String rC, String rD, String reponse) {
		this.question = question;
		this.rA = rA;
		this.rB = rB;
		this.rC = rC;
		this.rD = rD;
		this.reponse = reponse;
		r = getReponse(reponse);
	}

	public String getReponse(String reponse) {
		if(reponse.equalsIgnoreCase("rA")){
			return rA;
		}
		if(reponse.equalsIgnoreCase("rB")){
			return rB;
		}
		if(reponse.equalsIgnoreCase("rC")){
			return rC;
		}
		if(reponse.equalsIgnoreCase("rD")){
			return rD;
		}
		return "";
	}
}
